import { defHttp } from "@/utils/http";
// ERP 科室单据 VO
export interface DeptDocsVO {
	id: number; // 主键ID,示例值(12912)
	receiptYear: string; // 年
	parentId: number; // 父级ID,示例值(28944)
	receiptDate: string; // 日期
	deptId: string; // 科室代码,示例值(29687)
	receiptType: number; // 单据类型,示例值(1)
	receiptNo: number; // 单据编号
	whsId: string; // 仓库代码,示例值(16418)
	sqNumb: number; // 序号
	printCount: number; // 打印次数,示例值(8259)
	receiverId: string; // 领取人,示例值(2451)
}

// ERP 科室单据 API
export const DeptDocsApi = {
	// 查询科室单据分页
	getDeptDocsPage: async (params: any) => {
		return await defHttp.get({ url: `/whs/receipt-dept/page`, params });
	},

	// 查询科室单据详情
	getDeptDocs: async (id: number) => {
		return await defHttp.get({ url: `/whs/receipt-dept/get?id=` + id });
	},

	// 新增科室单据
	createDeptDocs: async (data: DeptDocsVO) => {
		return await defHttp.post({ url: `/whs/receipt-dept/create`, data });
	},

	// 修改科室单据
	updateDeptDocs: async (data: DeptDocsVO) => {
		return await defHttp.put({ url: `/whs/receipt-dept/update`, data });
	},

	// 删除科室单据
	deleteDeptDocs: async (id: number) => {
		return await defHttp.delete({ url: `/whs/receipt-dept/delete?id=` + id });
	},

	// 导出科室单据 Excel
	exportDeptDocs: async (params: any) => {
		return await defHttp.download({ url: `/whs/receipt-dept/export-excel`, params });
	}
};
